home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
grafik
/
lightwave
/
lightwave-apr95
/
000264_owner-lightwave-l _Tue Apr 11 23:59:49 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-05-06
|
7KB
Return-Path: <owner-lightwave-l>
Received: by netcom11.netcom.com (8.6.12/Netcom)
id VAA19446; Tue, 11 Apr 1995 21:27:35 -0700
Received: by netcom13.netcom.com (8.6.12/Netcom)
id NAA16334; Tue, 11 Apr 1995 13:31:01 -0700
Date: Tue, 11 Apr 1995 13:31:01 -0700
From: shf (Stuart Ferguson)
Message-Id: <199504112031.NAA16334@netcom13.netcom.com>
To: cjohnson@crl.com, downinit@teleport.com
Subject: Re: Revenge of the NURBS
Cc: lightwave-l@netcom.com
Sender: owner-lightwave-l@netcom.com
Precedence: bulk
re: What are NURBs?
NURBs is a cool acronym that everyone knows is a good thing but almost
no one can tell you why. NURBs are a "check-list" item that every 3D
graphics program has to have for marketing reasons. NURBs is something
that I'm asked for constantly by users and NewTek marketing alike, but
no one can tell my what they would do if they had them.
But seriously, NURBs are a special type of B-spline developed for use
in 3D graphics. A cubic spline is a piecewise-cubic parametric curve
used to approximate a shape which may have an otherwise more complex
parameteric form. There are a wide variety of different cubic splines
used in graphics applications, each with different properties and
usages. The most common by far is the Bezier spline. These are used in
2D drawing applications and are usually controled by a set of points
along the curve with "handles" at each point which control the shape
of the curve at that point. The handles control the slope of the
curve through the point and how flat or round the curve is there. In
normal cases the interface will constrain the slope and roundness to
be the same on both sides of the control point (C1 continuity), but in
some cases the symmetry can be broken so the slope is the same but the
roundness is different (G1 continuity), or both the slope and roundness
are different (C0 continuity).
LightWave uses a special form of cubic spline to interpolate keyframes
while animating. The positions to interpolate are the keyframe locations,
and the curvature information is computed using the tension, continuity
and bias values at each key. These are eqivalent to the handles on a
Bezier spline. If continuity is zero, the curve is C1; if continuity
is non-zero, the curve is C0. Note that G1, so-called geometric
comtinuity, is only useful for making curves to fit shapes, not for
animation. LightWave's splines are non-uniform, which is to say that
the number of frames between each key can vary.
Modeler's splines use a formula for the curvature at each knot which
makes them smoothly interpolate all their points. The reason for this
is interface simplicity, so that moving points exactly controls the shape
of the curve. They are always C1.
The nice thing about all these types of splines is that they interpolate
their control points. That is, the curve actually touches each knot or
key that the user sets down. The bad thing about these curves is that
they are only C1. This means that while the tangent to the curve is
continuous across the knot, the rate-of-change of the tangent is not.
You can sometimes see this when animating as a sudden change in
acceleration as an object passes a keyframe.
B-splines are the next class of cubic spline which address this issue.
B-splines are C2, which means that the tangent and the rate-of-change
of the tangent are continuous across control points which makes this
type of curve very smooth both when animating and when creating 2D
shapes. The cost is that B-splines do NOT interpolate their control
points. The points laid down by the user become more of a rough
guide for the shape of the curve which wends it way smoothly between
but rarely touching any of the points. There are no handles -- the
shape of the spline is given entirely by the control points.
There is one more step to go to get to NURBs. NURBs are a type of
B-spline and have all the properties that generic B-splines have: C2,
no handles, no passing through control points. They are also non-
uniform, which is useful for setting keyframes at arbitrary points
in time, but is not a really useful property when modeling. They
have two additional properties which distinguish them from generic
B-splines and to get to those we have to talk for a second about
homogeneous coordinates.
People who work in 3D graphics really like matrices. They like the
fact that any move in 3D space can be defined by a matrix which can
be multiplied by a vector to get the vector after the move. To add
a new move you just compose the matrices and the composite move can
then be applied en-masse to a set of points. Things are also easy
to solve using matrices since it is all linear algebra. The thing
they don't like is the perspective transfrom which actually uses a
division (gasp!) which takes it out of the realm of things which can
be done with matrices and linear equations (egad!). So the academics
in the field invented homogeneous coordinates.
Normally a position in 3D space can be given by a vector of three
values (X Y Z). In homogeneous coordinates a position is given by
a vector of four values (X Y Z W), whose three-space position is
given by (X/W Y/W Z/W). Note that this contains a division, so the
homogeneous coordinate transform (a 4x4 matrix) can encode the
perspective transformation in three-space. Oh happy day, we're
back to linear algebra to do the whole 3D to 2D transformation,
including, rotation, scaling, translation and perspective transform.
So NURBs, Non-Uniform Rational B-splines, are non-uniform B-splines
in homogeneous coordinates. The "Rational" part refers to the
division you do to get from homogeneous coordinates to ordinary
three-space coordinates. The first result of this is that you can
put the control points of a NURB through a perspective transform
and get a new NURB which is just what the orignal curve would look
like from that same perspective. This is no surprise, however,
since to compute each point along the NURB you have to perform
two divisions, which is just what you would have to do if you
computed the curve in three-space and applied the perspective
transform yourself. This property is therefore of NO VALUE to
the end user and is of only theoretic interest.
The other property is more interesting to end users. Because of
this additional division used to compute each point along the
curve, it is possible to make NURBs which exactly fit circles and
ellipses. This makes NURBs of great interest for CAD/CAM and
mechanical simulation applications. For animators, however, the
circles that can be made with generic B-splines, or even ordinary
C1 splines, can be made so close to actual circles that no one
could ever tell the difference.
In my opinion, NURBs are only interesting to the typical animator as
a buzzword. If you are truely more interested in the art than the
technology, forget NURBs, they solve nothing for you. B-splines, on
the other hand are extremely interesting because of their very nice
smoothness that results from being C2 continuous. It's very probable
you'll see B-splines in Modeler soon. NURBs, probably never.
- Stuart Ferguson